package com.spring.springboot.Service.Impl;

import com.spring.springboot.Mapper.UserMapper;
import com.spring.springboot.Service.UserListService;
import com.spring.springboot.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lking
 * @date 2019/11/29 20:40
 **/

@Service
public class UserListServiceImpl implements UserListService {

    @Autowired
    UserMapper userMapper;


    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public User getUsertById(int id) {
        return userMapper.getUsertById(id);
    }

    @Override
    public int deleteUserById(int id) {
        return userMapper.deleteUserById(id);
    }

    @Override
    public int insertUser(User user) {
        return userMapper.insertUser(user);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }
}
